package ToolsINTF

import (
	"AlgorithmPractice/src/common/comm_entity/db_entity"
)

/**
 * @author 蔚蔚樱
 * @version V1.0
 * @date 2022/10/11 23:40
 * @author-Email micromicrohard@outlook.com
 * @description
 * build sql
 * insert
 * query
 * synchronize
 */
type DBToolsINTF interface {
	// build sql
	BuildSelectSQL(className string, isDebug bool) string
	BuildSelectSQLInterface(className string) string

	// insert
	UTDataInsertByMaster(entity *db_entity.UTDataEntity)
	UTDataInsertBySlaver(entity *db_entity.UTDataEntity)
	UTDataInsertBatch()

	// query
	UTDateQueryBySlaver(className string) ([]*db_entity.UTDataEntity, error)
	UTDateQueryAll() ([]*db_entity.UTDataEntity, error)

	// sync
	SynchronizationUTData() // 主从同步
}
